<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>opennars: nars.entity.Concept.processJudgment</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">opennars
   &#160;<span id="projectnumber">1.5.5</span>
   </div>
   <div id="projectbrief">1.5-ish</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="../../namespaces.html"><span>Packages</span></a></li>
      <li><a href="../../annotated.html"><span>Classes</span></a></li>
      <li><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('d4/d22/classnars_1_1entity_1_1Concept_a40cddcc82ee28a1cf5b1f4bc14e2b078.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="contents">
<a class="anchor" id="a40cddcc82ee28a1cf5b1f4bc14e2b078"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void nars.entity.Concept.processJudgment </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/ddc/classnars_1_1entity_1_1Task.html">Task</a>&#160;</td>
          <td class="paramname"><em>task</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>To accept a new judgment as isBelief, and check for revisions and solutions. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">judg</td><td>The judgment to be accepted </td></tr>
    <tr><td class="paramname">task</td><td>The task to be processed </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Whether to continue the processing of the task </dd></dl>

<p>Definition at line <a class="el" href="../../df/d62/Concept_8java_source.html#l00114">114</a> of file <a class="el" href="../../df/d62/Concept_8java_source.html">Concept.java</a>.</p>

<p>References <a class="el" href="../../d8/d59/BudgetValue_8java_source.html#l00198">nars.entity.BudgetValue.aboveThreshold()</a>, <a class="el" href="../../df/d62/Concept_8java_source.html#l00214">nars.entity.Concept.addToTable()</a>, <a class="el" href="../../d8/d59/BudgetValue_8java_source.html#l00108">nars.entity.BudgetValue.decPriority()</a>, <a class="el" href="../../d8/d4f/Stamp_8java_source.html#l00193">nars.entity.Stamp.equals()</a>, <a class="el" href="../../df/d62/Concept_8java_source.html#l00245">nars.entity.Concept.evaluation()</a>, <a class="el" href="../../d9/de0/Item_8java_source.html#l00082">nars.entity.Item.getBudget()</a>, <a class="el" href="../../db/d0c/Memory_8java_source.html#l00658">nars.storage.Memory.getNewStamp()</a>, <a class="el" href="../../d6/d10/Task_8java_source.html#l00099">nars.entity.Task.getSentence()</a>, <a class="el" href="../../da/d1c/Sentence_8java_source.html#l00173">nars.entity.Sentence.getStamp()</a>, <a class="el" href="../../db/d0c/Memory_8java_source.html#l00119">nars.storage.Memory.getTime()</a>, <a class="el" href="../../d8/d4f/Stamp_8java_source.html#l00119">nars.entity.Stamp.make()</a>, <a class="el" href="../../db/d0c/Memory_8java_source.html#l01141">nars.storage.Memory.Parameters.MAXIMUM_BELIEF_LENGTH</a>, <a class="el" href="../../d0/db7/LocalRules_8java_source.html#l00075">nars.inference.LocalRules.revisible()</a>, <a class="el" href="../../d0/db7/LocalRules_8java_source.html#l00093">nars.inference.LocalRules.revision()</a>, <a class="el" href="../../db/d0c/Memory_8java_source.html#l00651">nars.storage.Memory.setCurrentBelief()</a>, <a class="el" href="../../db/d0c/Memory_8java_source.html#l00662">nars.storage.Memory.setNewStamp()</a>, and <a class="el" href="../../d0/db7/LocalRules_8java_source.html#l00118">nars.inference.LocalRules.trySolution()</a>.</p>

<p>Referenced by <a class="el" href="../../df/d62/Concept_8java_source.html#l00096">nars.entity.Concept.directProcess()</a>.</p>
<div class="fragment"><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;                                            {</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;        Sentence judg = task.getSentence();</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        Sentence oldBelief = <a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_a3da4b5320acef5ecbcb256090e4aff94.html#a3da4b5320acef5ecbcb256090e4aff94">evaluation</a>(judg, <a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_a8b68e5eb605ffd96cf53c86b5368caa2.html#a8b68e5eb605ffd96cf53c86b5368caa2">beliefs</a>);</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;        <span class="keywordflow">if</span> (oldBelief != null) {</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;            Stamp newStamp = judg.getStamp(), oldStamp = oldBelief.getStamp();</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;            <span class="keywordflow">if</span> (newStamp.equals(oldStamp)) {</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;                task.getBudget().decPriority(0);    <span class="comment">// duplicated task</span></div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;                <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;            } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (LocalRules.revisible(judg, oldBelief)) {</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;                <a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_a2ab0b0c82e09c852076ce4c90c502d4c.html#a2ab0b0c82e09c852076ce4c90c502d4c">memory</a>.<a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory_aa8d87fbd9fbd6229e88184fd23553778.html#aa8d87fbd9fbd6229e88184fd23553778">setNewStamp</a>(Stamp.make(newStamp, oldStamp, <a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_a2ab0b0c82e09c852076ce4c90c502d4c.html#a2ab0b0c82e09c852076ce4c90c502d4c">memory</a>.<a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory_aaa97540563b646b33db1263fa3a97d53.html#aaa97540563b646b33db1263fa3a97d53">getTime</a>()));</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;                <span class="keywordflow">if</span> (<a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_a2ab0b0c82e09c852076ce4c90c502d4c.html#a2ab0b0c82e09c852076ce4c90c502d4c">memory</a>.<a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory_a09af34150e8562d5c93170388c8804b7.html#a09af34150e8562d5c93170388c8804b7">getNewStamp</a>() != null) {</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;                    <a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_a2ab0b0c82e09c852076ce4c90c502d4c.html#a2ab0b0c82e09c852076ce4c90c502d4c">memory</a>.<a class="code" href="../../d8/df4/classnars_1_1storage_1_1Memory_a3482da9df329962e73213118fbaef131.html#a3482da9df329962e73213118fbaef131">setCurrentBelief</a>(oldBelief);</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;                    LocalRules.revision(judg, oldBelief, <span class="keyword">false</span>, <a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_a2ab0b0c82e09c852076ce4c90c502d4c.html#a2ab0b0c82e09c852076ce4c90c502d4c">memory</a>);</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;                }</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;            }</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;        }</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;        <span class="keywordflow">if</span> (task.getBudget().aboveThreshold()) {</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;            <span class="keywordflow">for</span> (Task ques : <a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_a64d60676d973a0ebf9132552d01522c2.html#a64d60676d973a0ebf9132552d01522c2">questions</a>) {</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;<span class="comment">//                LocalRules.trySolution(ques.getSentence(), judg, ques, memory);</span></div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;                LocalRules.trySolution(judg, ques, <a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_a2ab0b0c82e09c852076ce4c90c502d4c.html#a2ab0b0c82e09c852076ce4c90c502d4c">memory</a>);</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;            }</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;            <a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_a83976b43424cb26fe9cea8654cfee743.html#a83976b43424cb26fe9cea8654cfee743">addToTable</a>(judg, <a class="code" href="../../d4/d22/classnars_1_1entity_1_1Concept_a8b68e5eb605ffd96cf53c86b5368caa2.html#a8b68e5eb605ffd96cf53c86b5368caa2">beliefs</a>, Memory.Parameters.MAXIMUM_BELIEF_LENGTH);</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;        }</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    }</div>
<div class="ttc" id="classnars_1_1entity_1_1Concept_a8b68e5eb605ffd96cf53c86b5368caa2_html_a8b68e5eb605ffd96cf53c86b5368caa2"><div class="ttname"><a href="../../d4/d22/classnars_1_1entity_1_1Concept_a8b68e5eb605ffd96cf53c86b5368caa2.html#a8b68e5eb605ffd96cf53c86b5368caa2">nars.entity.Concept.beliefs</a></div><div class="ttdeci">ArrayList&lt; Sentence &gt; beliefs</div><div class="ttdoc">Sentences directly made about the term, with non-future tense. </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d62/Concept_8java_source.html#l00061">Concept.java:61</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_a09af34150e8562d5c93170388c8804b7_html_a09af34150e8562d5c93170388c8804b7"><div class="ttname"><a href="../../d8/df4/classnars_1_1storage_1_1Memory_a09af34150e8562d5c93170388c8804b7.html#a09af34150e8562d5c93170388c8804b7">nars.storage.Memory.getNewStamp</a></div><div class="ttdeci">Stamp getNewStamp()</div><div class="ttdoc">The new Stamp. </div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l00658">Memory.java:658</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_aa8d87fbd9fbd6229e88184fd23553778_html_aa8d87fbd9fbd6229e88184fd23553778"><div class="ttname"><a href="../../d8/df4/classnars_1_1storage_1_1Memory_aa8d87fbd9fbd6229e88184fd23553778.html#aa8d87fbd9fbd6229e88184fd23553778">nars.storage.Memory.setNewStamp</a></div><div class="ttdeci">void setNewStamp(Stamp newStamp)</div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l00662">Memory.java:662</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_a3482da9df329962e73213118fbaef131_html_a3482da9df329962e73213118fbaef131"><div class="ttname"><a href="../../d8/df4/classnars_1_1storage_1_1Memory_a3482da9df329962e73213118fbaef131.html#a3482da9df329962e73213118fbaef131">nars.storage.Memory.setCurrentBelief</a></div><div class="ttdeci">void setCurrentBelief(Sentence currentBelief)</div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l00651">Memory.java:651</a></div></div>
<div class="ttc" id="classnars_1_1storage_1_1Memory_aaa97540563b646b33db1263fa3a97d53_html_aaa97540563b646b33db1263fa3a97d53"><div class="ttname"><a href="../../d8/df4/classnars_1_1storage_1_1Memory_aaa97540563b646b33db1263fa3a97d53.html#aaa97540563b646b33db1263fa3a97d53">nars.storage.Memory.getTime</a></div><div class="ttdeci">long getTime()</div><div class="ttdef"><b>Definition:</b> <a href="../../db/d0c/Memory_8java_source.html#l00119">Memory.java:119</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Concept_a2ab0b0c82e09c852076ce4c90c502d4c_html_a2ab0b0c82e09c852076ce4c90c502d4c"><div class="ttname"><a href="../../d4/d22/classnars_1_1entity_1_1Concept_a2ab0b0c82e09c852076ce4c90c502d4c.html#a2ab0b0c82e09c852076ce4c90c502d4c">nars.entity.Concept.memory</a></div><div class="ttdeci">Memory memory</div><div class="ttdoc">Reference to the memory. </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d62/Concept_8java_source.html#l00063">Concept.java:63</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Concept_a83976b43424cb26fe9cea8654cfee743_html_a83976b43424cb26fe9cea8654cfee743"><div class="ttname"><a href="../../d4/d22/classnars_1_1entity_1_1Concept_a83976b43424cb26fe9cea8654cfee743.html#a83976b43424cb26fe9cea8654cfee743">nars.entity.Concept.addToTable</a></div><div class="ttdeci">void addToTable(Sentence newSentence, ArrayList&lt; Sentence &gt; table, int capacity)</div><div class="ttdoc">Add a new belief (or goal) into the table Sort the beliefs/goals by rank, and remove redundant or low...</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d62/Concept_8java_source.html#l00214">Concept.java:214</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Concept_a64d60676d973a0ebf9132552d01522c2_html_a64d60676d973a0ebf9132552d01522c2"><div class="ttname"><a href="../../d4/d22/classnars_1_1entity_1_1Concept_a64d60676d973a0ebf9132552d01522c2.html#a64d60676d973a0ebf9132552d01522c2">nars.entity.Concept.questions</a></div><div class="ttdeci">List&lt; Task &gt; questions</div><div class="ttdoc">Question directly asked about the term. </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d62/Concept_8java_source.html#l00059">Concept.java:59</a></div></div>
<div class="ttc" id="classnars_1_1entity_1_1Concept_a3da4b5320acef5ecbcb256090e4aff94_html_a3da4b5320acef5ecbcb256090e4aff94"><div class="ttname"><a href="../../d4/d22/classnars_1_1entity_1_1Concept_a3da4b5320acef5ecbcb256090e4aff94.html#a3da4b5320acef5ecbcb256090e4aff94">nars.entity.Concept.evaluation</a></div><div class="ttdeci">Sentence evaluation(Sentence query, Iterable&lt; Sentence &gt; list)</div><div class="ttdoc">Evaluate a query against beliefs (and desires in the future) </div><div class="ttdef"><b>Definition:</b> <a href="../../df/d62/Concept_8java_source.html#l00245">Concept.java:245</a></div></div>
</div><!-- fragment -->
<p><div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="../../closed.png" alt="+"/> Here is the call graph for this function:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d4/d22/classnars_1_1entity_1_1Concept_a40cddcc82ee28a1cf5b1f4bc14e2b078_a40cddcc82ee28a1cf5b1f4bc14e2b078_cgraph.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
</p>

<p><div id="dynsection-1" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-1-trigger" src="../../closed.png" alt="+"/> Here is the caller graph for this function:</div>
<div id="dynsection-1-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-1-content" class="dyncontent" style="display:none;">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="../../d4/d22/classnars_1_1entity_1_1Concept_a40cddcc82ee28a1cf5b1f4bc14e2b078_a40cddcc82ee28a1cf5b1f4bc14e2b078_icgraph.svg" width="100%" height="388"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
</div>
</div>
</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../d7/d81/namespacenars.html">nars</a></li><li class="navelem"><a class="el" href="../../db/dec/namespacenars_1_1entity.html">entity</a></li><li class="navelem"><a class="el" href="../../d4/d22/classnars_1_1entity_1_1Concept.html">Concept</a></li>
    <li class="footer">Generated on Sun Jan 10 2016 18:03:59 for opennars by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
  </ul>
</div>
</body>
</html>
